/*
 * Id: $Id$
 *
 * Copyright (c) Critical Software S.A., All Rights Reserved.
 * (www.criticalsoftware.com)
 *
 * This software is the proprietary information of Critical Software S.A.
 * Use is subject to license terms.
 *
 * Last changed on : $Date$
 * Last changed by : $Author$
 */
package com.m2rt.queuenumber.service;

import com.m2rt.queuenumber.domain.entities.Office;
import com.m2rt.queuenumber.domain.repository.OfficeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Description.
 *
 * @author :    Marco Ribeiro
 * @version :   $Rev$
 */
@Service
public class OfficeServiceImpl implements OfficeService{

    @Autowired
    private OfficeRepository _repository;

    @Override
    public Office createOffice(Office office) {
        return _repository.save(office);
    }

    @Override
    public List<Office> findOfficesByName(String name) {
        return  _repository.findByName(name);
    }
}